clear

use "C:\Users\jonne\OneDrive\EUI\thesis\chapters\too important to ignore\analysis\data\all_data_long.dta"

encode rid, generate(rid_c)
encode QPT2_1, generate(QPT2_1_c)
encode QPT2_2, generate(QPT2_2_c)
encode QPT2_3, generate(QPT2_3_c)
encode QPT2_4, generate(QPT2_4_c)
encode QPT3_1, generate(QPT3_1_c)
encode QPT3_2, generate(QPT3_2_c)
encode QPT3_4, generate(QPT3_4_c)
encode QPT3_5, generate(QPT3_5_c)

encode gender, generate(gender_c)
encode issue, generate(issue_c)

mlogit salience_char age gender_c education income interest leftright risks, vce(cluster rid)


// Export results to LaTeX table
eststo: esttab using "my_table.tex", mlabel("Model 1") cells(b(star fmt(3)) se(fmt(3) par)) ///
    label title("Multinomial Logistic Regression Results") nonumber replace ///
    mtitle("Variables") collabels(none) ///
    star(* 0.10 ** 0.05 *** 0.01) ///
    addnote("Standard errors in parentheses\n" "Significance levels : *** p<0.01, ** p<0.05, * p<0.1")

	
